var express = require('express');
var router = express.Router();
const {generateMockUsers} = require('@utils/mockGenerator.js');
const {sleep} = require('@utils');

router.get('/', function (req, res) {
    res.send('user');
});

router.get('/item', function (req, res) {
    res.send('user-item');
});

router.get('/mockUserList', async function (req, res) {
    await sleep(3 * 1000);
    res.send({
        code: 200,
        data: generateMockUsers(12),
    });
});

module.exports = router;
